package com.wangijun.yuan.web.task;

import com.wangijun.yuan.web.service.MailService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * 功能描述: 一些Job
 *
 * @author wlf 2024/3/22 17:38
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class GlobalTask {
    private final MailService mailService;
    /**
     * 功能描述: 每天早晨零点重置
     *
     * @author wlf 2024/3/22 17:23
     */
    @Scheduled(cron = "0 0 1 * * ?")
    void removeSendEmailNum() {
        mailService.restSendNum();
    }
}
